<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>{$webname}-管理登录</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  <link rel="stylesheet" href="__STATIC__/admin/layui/css/layui.css" media="all">
  <link rel="stylesheet" href="__STATIC__/admin/css/login.css" media="all">
	{if $webinfo.ico}<link rel="shortcut icon" type="image/x-icon" href="{$webinfo.ico}" />{/if}
</head>
<body>
	<!-- #03152A #2E241B #50314F #344058 #20222A  -->
  <div class="layadmin-user-login layadmin-user-display-show" id="LAY-user-login" style="padding-top:calc(50vh - 250px);{if $webinfo['adminloginbg']}background:url('{$webinfo.adminloginbg}');background-size:100% auto;{else}background:linear-gradient(#2D8CF0,#2D8CF0);{/if}" >
    <div class="layadmin-user-login-main" bgimg style="position:relative;width:420px">
      <div class="layadmin-user-login-box layadmin-user-login-header" style="padding-bottom:0;">
        <div style="color:#0076FE;font-size:26px;;margin:15px 0 10px 0">{$webname}后台登录</div>
      </div>
      <div class="layadmin-user-login-box layadmin-user-login-body layui-form" style="padding:20px 40px">
        <div class="layui-form-item" style="margin-bottom:25px">
          <label class="layadmin-user-login-icon layui-icon layui-icon-username" for="LAY-user-login-username"></label>
          <input type="text" name="username" id="LAY-user-login-username" lay-verify="required" placeholder="用户名/手机号" class="layui-input" value="">
        </div>
        <div class="layui-form-item" style="margin-bottom:25px">
          <label class="layadmin-user-login-icon layui-icon layui-icon-password" for="LAY-user-login-password"></label>
          <input type="password" name="password" id="LAY-user-login-password" lay-verify="required" placeholder="登录密码" class="layui-input" value="">
        </div>
        <div class="layui-form-item" style="margin-bottom:25px">
          <div class="layui-row">
            <div class="layui-col-xs7">
              <label class="layadmin-user-login-icon layui-icon layui-icon-vercode" for="LAY-user-login-vercode"></label>
              <input type="text" name="captcha" id="LAY-user-login-vercode" lay-verify="required" placeholder="图形验证码" class="layui-input">
            </div>
            <div class="layui-col-xs5">
              <div style="margin-left: 10px;">
                <img src="{:captcha_src()}" class="layadmin-user-login-codeimg" id="LAY-user-get-vercode">
              </div>
            </div>
          </div>
        </div>
        <div class="layui-form-item" style="margin-bottom: 20px;">
          <input type="checkbox" name="remember" lay-skin="primary" title="下次自动登录" {if cookie('remember')==1}checked{/if}>
          <!-- <a href="{:url('getpwd')}" class="layadmin-user-jump-change layadmin-link" style="margin-top: 7px;">忘记密码？</a> -->
        </div>
        <div class="layui-form-item" style="margin-top:30px;">
          <button class="layui-btn layui-btn-fluid" lay-submit lay-filter="LAY-user-login-submit" style="background:#0076FE;height:44px;line-height:height:44px;font-size:14px">登 录</button>
        </div>
				{if $reg_open}
        <div class="layui-form-item">
          <a href="{:url('reg')}" class="layadmin-user-jump-change layadmin-link" style="margin-top: 7px;">没有账号？前往注册</a>
        </div>
				{/if}
      </div>
    </div>
		{if $webinfo['copyright'] || $webinfo['beian']}
    <div class="layui-trans layadmin-user-login-footer" id="slideTest1" style="background:rgba(0,0,0,0.1);color:#eee;height:48px;line-height:48px;padding:0">
			{$webinfo.copyright}&nbsp;&nbsp;&nbsp;<a href="http://beian.miit.gov.cn/" target="_blank" style="color:#eee">{$webinfo.beian}</a>
    </div>
		{/if}
  </div>
 
	{include file="public/js"/}
  <script>
	$(function(){
		$('#LAY-user-get-vercode').click(function(){
			this.src = '{:captcha_src()}&t='+ new Date().getTime();
		})
	});
	//提交
	var loading = false;
	var form = layui.form
	layui.form.on('submit(LAY-user-login-submit)', function(obj){
		if(loading) return;
		loading = true;
		var index = layer.load();
		$.post("",obj.field,function(data){
			layer.close(index)
			if(data.status==2){
				$('#LAY-user-get-vercode').attr('src','{:captcha_src()}&t='+ new Date().getTime());
			}
			dialog(data.msg,data.status);
			if (typeof(data.url) != "undefined" && data.url != ""){
				setTimeout(function(){
					if(window.parent != this.window){
						window.parent.location.href = data.url;
					}else{
						window.location.href = data.url;
					}
				},1000)
			}else{
				loading = false;
			}
		})
	});
	$(document).keydown(function (e) {
		if (e.keyCode === 13){
			if($('.layui-layer-dialog').length==0){
				$("button[lay-filter='LAY-user-login-submit']").trigger("click");
			}else{
				$('.layui-layer-btn0').trigger('click');
			}
		}
	});
  </script>
	{include file="public/copyright"/}
</body>
</html>